import request from '@/utils/request'
import { getServicePath } from '@/api/baseUrlConfig'
const servicePath = getServicePath()

// 查询班子建设
export function queryByCondition (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + '/team-building/queryByCondition',
    method: 'get',
    params: data
  })
}

// 查询班子建设详情
export function queryById (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/team-building/queryById/${data.id}`,
    method: 'get',
    params: data
  })
}

// 删除班子建设
export function deleteById (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/team-building/deleteById/${data.id}`,
    method: 'get',
    params: data
  })
}
// 新增班子建设
export function add (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + '/team-building/add',
    method: 'post',
    data
  })
}
// 编辑班子建设
export function edit (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + '/team-building/edit',
    method: 'post',
    data
  })
}

// 查询班子成员
export function queryMemberList (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + '/member-info/queryByCondition',
    method: 'get',
    params: data
  })
}

// 删除班子成员
export function deleteMemberById (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/member-info/deleteById/${data.id}`,
    method: 'get',
    params: data
  })
}

// 添加班子成员
export function addMember (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/member-info/add`,
    method: 'post',
    data
  })
}

// 编辑班子成员
export function editMember (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/member-info/edit`,
    method: 'post',
    data
  })
}

// 查询党员列表
export function queryPersonList (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/party-member-info-mgmt/queryList`,
    method: 'get',
    params: data
  })
}
// 查询党员信息
export function queryPersonById (data) {
  return request({
    url: (servicePath?.zhdjProjectServer || '') + `/party-member-info-mgmt/queryById/${data.id}`,
    method: 'get',
    params: data
  })
}
